package cn.com.xcf.service.impl;

import cn.com.xcf.dao.mapper.InvoiceTitleMapper;
import cn.com.xcf.dao.model.InvoiceTitle;
import cn.com.xcf.dao.model.InvoiceTitleExample;
import cn.com.xcf.service.InvoiceTitleService;
import cn.com.xcf.service.base.BaseServiceImpl;
import com.xcf.entity.Page;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * InvoiceTitleService实现
 * @author WongBin
 * @date 2017/12/8.
 */
@Transactional
//@Service(name="${objectNameLower}Service")
public class InvoiceTitleServiceImpl
    extends BaseServiceImpl<InvoiceTitleMapper, InvoiceTitle, InvoiceTitleExample>
    implements InvoiceTitleService {

    private InvoiceTitleMapper mapper;
    public void setMapper(InvoiceTitleMapper mapper) {
        this.mapper = mapper;
    }
    @Override
    public void initMapper() {
        //super.initMapper();
        super.mapper = this.mapper;
    }

    @Override
    public List getList(Object param, Map addition, Page page) {
        page.getPd().putAll(addition);
        //InvoiceTitleExample qry = new InvoiceTitleExample();
        InvoiceTitle qry = new InvoiceTitle();
        qry.setCheckId(Long.valueOf(""+param));
        //qry.createCriteria();
        qry.setPage(page);
        return mapper.querylistPage(qry);
    }
}